import { pages } from "./data/pages/pagesData";

const enum Tabbar {
  Home = "home",
  Discover = "discover",
  Shop = "shop",
  Calendar = "calendar",
  User = "user",
}

const iconPath = (iconType: Tabbar, selected = false) => {
  const selectedString = selected ? "-selected" : "";
  return `assets/icons/icon-${iconType}${selectedString}.png`;
};

export default {
  lazyCodeLoading: "requiredComponents",
  pages,
  requiredPrivateInfos: ["chooseAddress"],
  __usePrivacyCheck__: true,
  window: {
    backgroundTextStyle: "light",
    navigationStyle: "custom",
  },
  tabBar: {
    backgroundColor: "#FEFCF7",
    borderStyle: "black",
    color: "#808080",
    selectedColor: "#00a4b6",
    list: [
      {
        pagePath: "pages/home/index",
        iconPath: iconPath(Tabbar.Home),
        selectedIconPath: iconPath(Tabbar.Home, true),
        text: "首页",
      },
      {
        pagePath: "pages/discover/index",
        iconPath: iconPath(Tabbar.Discover),
        selectedIconPath: iconPath(Tabbar.Discover, true),
        text: "探索",
      },
      {
        pagePath: "pages/calendar/index",
        iconPath: iconPath(Tabbar.Calendar),
        selectedIconPath: iconPath(Tabbar.Calendar, true),
        text: "日历",
      },
      {
        pagePath: "pages/shop/index",
        iconPath: iconPath(Tabbar.Shop),
        selectedIconPath: iconPath(Tabbar.Shop, true),
        text: "商店",
      },
      {
        pagePath: "pages/user/index",
        iconPath: iconPath(Tabbar.User),
        selectedIconPath: iconPath(Tabbar.User, true),
        text: "我的",
      },
    ],
  },
};
